<?php
//+----------------------------------------------------
//| 工具类: 常用操作工具类
//| Author: web_dxj@163.com
//+----------------------------------------------------

namespace Api\Libs;

class ToolsUtil {


    /**
     * 讲其他类型的数据装换为int型
     *
     * @param $data
     * @return array|int
     */
    public static function toInt($data) {
        if (!is_array($data)) return intval($data);

        $arr = array();
        foreach ($data as $v) {
            $arr[] = intval($v);
        }

        return $arr;
    }


}